<script setup lang="ts">
    import Child from "@/components/Child.vue";
    import bus from "@/utils/bus";
    import {onMounted} from "vue";
    onMounted(()=>{
        bus.on("one",function(a){
            console.log("one",a);
            // bus.off("one")
        })
    })
</script>

<template>
    <h3>App</h3>
    <button @click="bus.emit('one',100)">点我</button>
    <hr/>
    <Child/>
</template>

<style scoped>

</style>